
import { useModel } from 'umi';
import React from 'react'
import { uploadFileUrl } from '@/service/common/upload';
import OrderSteps from './orderSteps';

interface Props {
  open: boolean;
  setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
}

function DelayRent({ open, setIsOpen }: Props) {
  const { initialState } = useModel('@@initialState');
  const { fileName } = initialState || {};
  const uploadProps = {
    action: uploadFileUrl,
    name: fileName,
    data: {
      modelName: 'spAccess',
      targetAttr: 1,
    },
    onChange() {
      
    },
    // filesList,
  };
  return (
    <OrderSteps
      uploadProps={uploadProps}
      setIsOpen={setIsOpen}
      open={open}
      steps={3}
      onSubmit={(callback: any) => {
        callback();
      }}
      title="申请延租"
      stepsData={[
        '下载模板、上传文件',
        '数据检测、执行导入',
        '确认结果、完成导入',
      ]}
    />
  );
}

export default DelayRent;
